-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: custom vesting module to check signer in allow list #387
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we write genesis tests and ante handler test please?
also if we can add a readme.md about this module with a simple explanation of what it does.
for _, disabledTypeURL := range pvd.disabledMsgTypeURLs { | ||
if typeURL == disabledTypeURL { | ||
// Check if vesting tx signer is 1 | ||
if len(msg.GetSigners()) != 1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we blocking multisigs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I see, all vesting msgs on cosmos-sdk or evmos only contains 1 signer. WDYT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok we can start with that
@omritoptix isn't it bit redundent to have a dedicated module to keep the permission address? Can't we reuse the whitelisted address from other module? it would be the 3rd place we manage |
we need to consider how to enforce it through
|
) | ||
|
||
// PermissionedVestingDecorator prevents invalid msg types from being executed | ||
type PermissionedVestingDecorator struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not wired in app.go ante handler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the dymension-rdk doesn't actually have antehandler. So I added it here then on rollapp-evm's app.go, we just need to call the Decorator from here
@mtsitrin yea thought about it initially but imo it's less than ideal for 2 reasons:
|
Close and decide to not have vesting module on rdk just for permissioned addresses |
As mentioned in rollapp-evm . We need to custom vesting module for creating a allow list that can create vest account.
The code is taken from cosmos-sdk with a few changes for
allow list
.